#include "head.hpp"
int init_status(status_t *status, int num)
{
    status->size = num;
    status->exit_flag = 0;
    status->thread = (pthread_t *)malloc(num * sizeof(pthread_t));
    memset(&status->queue, 0, sizeof(queue_t));
    pthread_mutex_init(&status->lock, nullptr);
    pthread_cond_init(&status->cond, nullptr);
    return 0;
}